﻿Namespace Lookups
    Public Class Voices

#Region "Constructors"
        Private Sub New()
            'Seal the class
        End Sub
#End Region

#Region "Shared Methods"
        Public Shared Function GetVoice(ByVal voice As VoiceEnum) As String
            Return _voicesArray(voice)
        End Function

        Public Shared Function GetVoicesBindingSource() As IEnumerable(Of String)
            Dim returnable(_voicesArray.Length) As String
            Array.Copy(_voicesArray, returnable, _voicesArray.Length)
            Return returnable
        End Function

        Public Shared Function GetVoiceEnumFromDescription(ByVal description As System.String) As VoiceEnum
            Dim index As Int32 = Array.IndexOf(_voicesArray, description)
            If index = -1 Then
                Throw New ArgumentOutOfRangeException("description", System.String.Format("""{0}"" is not a valid action description.", description))
            End If

            Return DirectCast([Enum].Parse(GetType(VoiceEnum), index), VoiceEnum)
        End Function

#End Region

#Region "Shared Member Fields"
        Private Shared _voicesArray As System.String() = { _
            "", _
            "AU-Colleen", _
            "AU-Jon", _
            "BE-Hendrik", _
            "BE-Minna", _
            "BR-Lygia", _
            "CA-Antonine", _
            "CA-Felix", _
            "CN-Pan", _
            "CZ-Zdenech", _
            "DE-Otto", _
            "DK-Karen", _
            "DK-Pia", _
            "EG-Nabil", _
            "EG-Nayla", _
            "ES-Alfonsina", _
            "ES-Baltasar", _
            "ES-Bertrana", _
            "ES-Dunixe", _
            "ES-Emilia", _
            "ES-Rosalia", _
            "FR-Anastasie", _
            "FR-Archibald", _
            "FR-Gertrude", _
            "FR-Maxence", _
            "GR-Antonis", _
            "IE-Orla", _
            "IN-Nima", _
            "IN-Sangeeta", _
            "IT-Assunta", _
            "IT-Ugo", _
            "JP-Tamura", _
            "KR-Choe", _
            "NL-Femke", _
            "NL-Max", _
            "NL-Renate", _
            "NO-Cora", _
            "NO-Sigrid", _
            "PL-Ignacy", _
            "PT-Celia", _
            "RU-Bella", _
            "SE-Hjalmar", _
            "SE-Maj", _
            "SE-Selma", _
            "TH-Boon-mee", _
            "TR-Asli", _
            "UK-Edwin", _
            "UK-Leonard", _
            "UK-Mistermuggles", _
            "UK-Penelope", _
            "UK-Shirley", _
            "US-Bethany", _
            "US-Billye", _
            "US-Clarence", _
            "US-Darleen", _
            "US-Liberty", _
            "US-Lilian", _
            "YUE-Baibo", _
            "ZA-Wilbur" _
            }
#End Region

    End Class
End Namespace
